<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>固定定位</title>
    <style>
        .box{
            width: 100%;
            height: 1500px;
            background: yellow;
        }
        .ad{
            width: 100px;
            height: 200px;
            background: red;
            position: fixed;
            /* fixed脱离文档流 */
            /* 没有父元素，absolute该参照物是浏览器窗口的第一屏 */
            right: 0;
            bottom: 100px;
        }
    </style>
</head>
<body>
    <div class="box"></div>
    <div class="ad"></div>
</body>
</html>